package com.mendmix.tutorial.event.sub;

import org.springframework.stereotype.Service;

import com.mendmix.amqp.MQMessage;
import com.mendmix.amqp.MQTopicRef;
import com.mendmix.amqp.MessageHandler;
import com.mendmix.common.util.JsonUtils;


@Service
@MQTopicRef("demo-topic")
public class DemoMessageHandler implements MessageHandler {

	@Override
	public void process(MQMessage message) throws Exception {
		System.out.println("----------收到MQ消息------------");
		System.out.println(JsonUtils.toJson(message));
	}

}
